import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;


public class EIErrorea extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private JButton okButton;
	/**
	 * Create the dialog.
	 */
	public EIErrorea() {
		setBounds(300, 250, 450, 300);
		getContentPane().setLayout(null);
		contentPanel.setBounds(0, 0, 442, 182);
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel);
		contentPanel.setLayout(null);
		{
			JLabel lblEzDuzuErabiltzaile = new JLabel("Ez duzu erabiltzaile zuzena sartu.");
			lblEzDuzuErabiltzaile.setBounds(96, 72, 266, 17);
			lblEzDuzuErabiltzaile.setFont(new Font("Dialog", Font.BOLD, 14));
			contentPanel.add(lblEzDuzuErabiltzaile);
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setBounds(0, 180, 442, 92);
			getContentPane().add(buttonPane);
			buttonPane.setLayout(null);
			{
				okButton = new JButton("OK");
				okButton.setBounds(195, 26, 54, 25);
				buttonPane.add(okButton);
				okButton.setActionCommand("OK");
				getRootPane().setDefaultButton(okButton);
			}
		}
		listenerrakGehitu();
	}
	public void listenerrakGehitu(){
		okButton.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				EILogin frame = new EILogin();
				EIErrorea.this.dispose();
			}
		});
	}
}
